#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
    const char* numStrArr[10] = { "", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
    void Combine(const string& digits, int i, string combineStr, vector<string>& ret)
    {
        if (i == digits.size())
        {
            ret.push_back(combineStr);
            return;
        }

        int num = digits[i] - '0';
        string str = numStrArr[num];
        for (auto ch : str)
        {
            Combine(digits, i + 1, combineStr + ch, ret);
        }
    }


public:
    vector<string> letterCombinations(const string& digits) {
        vector<string> v;
        if (digits.empty())
        {
            return v;
        }

        string str;
        Combine(digits, 0, str, v);
        return v;

    }
};